<%-- 
    Document   : login
    Created on : 02-feb-2013, 20:56:49
    Author     : ernesto
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Login del Sistema</title>
    </head>
    <body>
        <%
            if (session.getAttribute("login") != null) {
                response.sendRedirect("index.jsp");
            } else {
        %>

<center>
        <h1>Formulario de Acceso</h1>

        <form action="login" name="log">
            <p>Usuario:  <input required="true" name="login" type="text" /></p>
            <p>Contrase&ntilde;a:   <input required="true" name="passwd" type="password" /></p>
            <p><input type="submit" value="Login" /></p>
</center>
    
            <p>
                <%
                    if (session.getAttribute("valid") != null) {
                        out.println(session.getAttribute("valid"));
                        session.removeAttribute("valid");
                    }
                %>
            </p>
        </form>
        <%
            }
        %>
    </body>
</html>
